import request from '@/utils/request'
const apiUrl = '/api/archive-borrow'
// 分页查询档案借阅记录
export function getArchiveBorrowPage(params) {
    return request({
        url: `${apiUrl}/page`,
        method: 'get',
        params
    })
}

// 获取档案借阅详情
export function getArchiveBorrowById(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'get'
    })
}

// 新增或更新档案借阅记录
export function saveOrUpdateArchiveBorrow(data) {
    return request({
        url: `${apiUrl}/save`,
        method: 'post',
        data
    })
}

// 删除档案借阅记录
export function deleteArchiveBorrow(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'delete'
    })
}

// 批量删除档案借阅记录
export function batchDeleteArchiveBorrow(ids) {
    return request({
        url: `${apiUrl}/batch`,
        method: 'delete',
        data: ids
    })
} 